package com.demo.coroutinedemo1

import android.util.Log
import kotlinx.coroutines.CoroutineExceptionHandler
import kotlin.coroutines.CoroutineContext

/**
 * Created by zhangyuncai on 2025/1/21.
 * 描述：
 */
class GlobalCoroutineExceptionHandler :CoroutineExceptionHandler{
    override val key: CoroutineContext.Key<*>
        get() =CoroutineExceptionHandler

    override fun handleException(context: CoroutineContext, exception: Throwable) {
        Log.d("Global","exception:${exception}")
    }
}